package samsung.sds.survey.surveyManagement.service;

import java.util.List;

import samsung.sds.survey.surveyManagement.model.SurveryCheckEntity;
import samsung.sds.survey.surveyManagement.model.SurveyEntity;
import samsung.sds.survey.surveyManagement.model.SurveyUserEntity;
import samsung.sds.system.common.baseQuery.BaseServiceInterface;

/**
 * @author tingcai.liu
 * @createDate 2016-01-15
 * 
 * 问卷发布的Service的接口
 */
public interface SurveyReleaseService extends BaseServiceInterface<SurveyUserEntity> {
	
    /**
     * 通过surveyId查找邀请的用户数
     *
     * @param surveyId
     * @return
     */
    public int queryUserCountBySurveyId(String surveyId);

    /**
     * 通过surveyId查找已投票的用户数
     *
     * @param surveyId
     * @return
     */
    public int queryUserVotedCountBySurveyId(String surveyId);
    
    /**
     * 新增问卷发布的对象用户
     * @param usernames
     * @param checkedDepartIds
     * @return
     */
  //  public int insertUserToList(String usernames, String checkedDepartIds);
    
    /**
     * 发布调查问卷
     * @param survey
     * @return
     */
    public int surveyRelease(SurveyEntity survey);
    
    /**
     * 删除用户对特定调查问卷的权限
     * @param survey_id
     * @param usernames
     * @return
     */
    public int deleteUser(String survey_id, String usernames);
    
	/**
	 * 根据surveyId查询部门，判断checkbox初始状态
	 * @param surveyId
	 * @return
	 */
	List<SurveryCheckEntity> queryUserCheckbox(String surveyId);

	/**
	 * 新增问卷发布的对象用户
	 * @param surveyId
	 * @param checkedDepartIds
	 * @return
	 */
	public int insertDeptUser(String surveyId, String checkedDepartIds);
	
	/**
	 * 删除问卷发布的用户对象
	 * @param surveyId
	 * @param nocheckedDepartIds
	 * @return
	 */
	public int deleteDeptUser(String surveyId, String nocheckedDepartIds);
	
	 /**
		 * 
	     * @param createUser 
	     * @param surveyId 
	     * @param map 
		 * @param request
		 * @param surveyUser
		 * @return
		 */
	    
	public List<SurveyUserEntity> selectGroupList(String createUser,String surveyId);
	
	 /**
     * 新增问卷发布的对象用户
     * @param groupForInsert
     * @param create_user 
     * @param survey_id
     * @param surveyUser
     * @return
     */
    public int insertGroupUserToSurveyUserList(String groupForInsert,String survey_id, String create_user);
    
    /**
     * 删除问卷发布的对象用户
     * @param groupForDelete
     * @param survey_id
     * @param surveyUser
     * @return
     */
	public int deleteGroupUserToSurveyUserList(String groupForDelete,String survey_id);
}
